package com.example.huanglinqing;

import android.annotation.SuppressLint;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.util.Log;
import android.widget.ListView;

import com.example.huanglinqing.mqtt.R;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

public class Dactivity extends AppCompatActivity {
    private HorizontalListView listView1;

private ListView listView2;
private List list;
public static String[]arr=new String[ ]{"11","22"};
    private String[]list1=new String[]{"220","230","240","150","250","220","230","240","150","250","220","230","240","150","250","220","230","240","150","250"};
    private String[]list2=new String[]{"100","230","110","120","250","220","230","240","150","250","220","230","240","150","250","220","230","240","150","250"};
    public static List list3=new ArrayList();
private List<Dinfo> mdata;
    @SuppressLint("WrongViewCast")
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.android_list);
        listView1=findViewById(R.id.list_view1);
        listView2=findViewById(R.id.list_view2);
      //list.add(arr);
mdata=new ArrayList<>();


        for (int i = 0; i < list1.length; i++) {
            Log.e("list1", String.valueOf(Arrays.equals(new String[]{list1[i]}, new String[]{list2[i]})));
           list3.add(String.valueOf(Arrays.equals(new String[]{list1[i]}, new String[]{list2[i]}))) ;
//            mdata.add(String.valueOf(Arrays.equals(new String[]{list1[i]}, new String[]{list2[i]})));
//            mdata.
            Log.e("list3",Arrays.toString(list3.toArray()));


        }


listView1.setAdapter(new Dadapter(Dactivity.this,list3));
        listView2.setAdapter(new Dadapter(Dactivity.this,list3));

    }
}
